<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> 
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ page import="java.util.HashMap"%>
<%@ page import="com.CGFrame.struts.POJOs.Element"%>
<html:html>
<head>
	<!--META http-equiv=Content-Type content="text/html; charset=utf-8"-->
	<LINK href="../styles/stylewang.css"  type=text/css rel=stylesheet>
	<LINK href="xtree.css"  type=text/css rel=stylesheet>
	<style type="text/css"></style>
			<script language=javascript>
			//fm.jsp从这个参数知道是这个点击刷新的
			var isFromHere=0;
			function showTaskInfo(path){
				isFromHere=1;
				top.B.Child.document.getElementById("fileframe").setAttribute("src","path/"+path+"?sort=dd");
			}
		
	</script>
	<html:base/>
</head>
<%
	String shotId = (String) request.getAttribute("ShotID");
%>
<body>
<table border="0" cellspacing="0" cellpadding="0" id="table1" width=100%>
		<tr>

			<logic:iterate name="Groups" id="element">
				<td id="btleftbian">

					<font color=990000><b>&nbsp;<bean:write name="element"
								property="elementGroupName" />
					</b>
					</font>

				</td>
			</logic:iterate>
			<td id="btrightbian">
				&nbsp;
			</td>
		</tr>

		<tr>
			<logic:iterate name="Elems" id="element">
				<td align="left" valign="top" id="leftcenter">
						<logic:iterate name="element" id="element1">
							<logic:equal name="element1" property="flag" value="true">	
							
										<a title="点击查看预览文件"
											onClick="showTaskInfo('<%=((HashMap) request
													.getAttribute("paths"))
													.get(((Element) element1)
															.getElementId())%>');"><u>
												<bean:write name="element1" property="elementName" /> </u> </a>

									<logic:notEmpty name="Manage">
										<a 
											href="./delElementShotAction.do?ShotID=<bean:write name="ShotID" />&ElementID=
                      <bean:write name="element1" property="elementId"/>
                    "
												onclick="return   confirm('ConfirmDelete')">[<bean:message
													key="delete" />]</a>

										</logic:notEmpty>
							<br>
							</logic:equal>
						</logic:iterate>
				</td>
			</logic:iterate>
			<td valign="top" id="tsrightcenter">
				&nbsp;
			</td>
		</tr>


		<logic:notEmpty name="Manage">

			<tr width="162">

				<logic:iterate name="Elems" id="element">
					<html:form action="/addShotElement">
						<html:hidden property="shotId" />
						<td id="leftbottom">
							<select name="elementId"
								style="border: 1px solid #000000; font-family: Tahoma; font-size: 11px">
								<option value="">
									--
									<bean:message key="select" />
									--
								</option>
								<logic:iterate name="element" id="element1">
									<logic:equal name="element1" property="flag" value="false">
										<option
											value="<bean:write name="element1" property="elementId"/>">
											<bean:write name="element1" property="elementName" />
										</option>
									</logic:equal>
								</logic:iterate>
							</select>
							&nbsp;
							<html:submit onclick="submitAddShotElement()">
								<bean:message key="add" />
							</html:submit>
						</td>
					</html:form>
				</logic:iterate>

				<td id="tsrightbottom">
					&nbsp;
				</td>

			</tr>
		</logic:notEmpty>
	</table>
</body>
</html:html>
